-
Notifications
You must be signed in to change notification settings - Fork 409
Call cat_ranges in blockcache for async filesystems #1336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1c95789 to
09d06d8
Compare
09d06d8 to
46ea642
Compare
|
Sorry I let this one slide - I still think it's useful. I have just the one comment above. |
46ea642 to
1fd8c23
Compare
|
Can you please solve the conflict, and I can have another look? |
1fd8c23 to
4dbb984
Compare
4dbb984 to
a048e26
Compare
|
@martindurant sorry that I abandoned this for so long. I fixed the merge conflicts and updated the tests. Please let me know if you still deem this valuable. |
| logger = logging.getLogger("fsspec") | ||
|
|
||
| Fetcher = Callable[[int, int], bytes] # Maps (start, end) to bytes | ||
| MultiFetcher = Callable[list[[int, int]], bytes] # Maps [(start, end)] to bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @monken @martindurant,
Unfortunately, this change breaks the usage of this library in Python 3.8. It's simple to reproduce:
from typing import Callable
X = Callable[list[[int, int]], bytes]Would it be possible to yank 2025.3.1 (at least while support for 3.8 is still being maintained)? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will yank, but I 2025.3.1 will henceforth only support >=3.9; it should have probably been done before now.
The CachingFileSystem can benefit from calling
cat_rangesfor asynchronous filesystems to concurrently download blocks. This speeds up filling the cache significantly for filesystems like HTTP and S3FS.